
package com.woniu.his.dms.client;


import com.woniu.his.dms.client.param.CaseHistoryDetailResult;
import com.woniu.his.dms.client.param.DefiniteDiseParam;
import com.woniu.his.dms.client.param.DmsCaseHistoryParam;
import com.woniu.his.dms.client.result.CaseHistoryResult;
import com.woniu.his.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * name是项目名，contextId是client的名字
 */
@FeignClient(contextId = "CaseHistoryClient", name = "dms", path = "dms")
public interface CaseHistoryClient {


    /**
    * @Description:  提交诊断信息（让患者进行检查或处置,生成病例id）
    * @Param:
    * @return: dx
    * @Date: 2022/11/27
    */
    @PostMapping("/submitPriliminaryDise")
    public Result<CaseHistoryResult> submitPriliminaryDise(@RequestBody DmsCaseHistoryParam dmsCaseHistoryParam);



    /**
     * @Description: 门诊确诊(确诊疾病,并且开处方拿药)
     * @Param:
     * @return: dx
     * @Date: 2022/11/27
     */
    @PostMapping("/submitDefiniteDise")
    public Result submitDefiniteDise(@RequestBody DefiniteDiseParam definiteDiseParam);


    /**
     * @Description: 诊毕（病人拿完药，或者处置完，或超过一定时间设置病例为诊病状态
     * @Param: dx
     * @return:
     * @Date: 2022/11/27
     */
    @GetMapping("/endDiagnosis")
    public Result endDiagnosis(@RequestParam("caseHistoryId") Long caseHistoryId);


    /**
    * @Description:  根据病例id查询已结束就诊的历史病历（病历首页显示 诊断结果 检查项目 检查结果  拿药处方 条目 ）
    * @Param:
    * @return: dx
    * @Date: 2022/11/27
    */
    @GetMapping("/selectEndCaseHistoryByReg")
    public Result<CaseHistoryDetailResult> selectEndCaseHistoryByReg(@RequestParam("caseHistoryId") Long caseHistoryId);

    /**
     * 检查病历是否存在
     *
     * @param caseHistoryId 病历id
     * @return {@link Result}
     */
    @GetMapping("/checkCaseHistoryExist")
    public Result<CaseHistoryResult> checkCaseHistoryExist(@RequestParam("caseHistoryId") Long caseHistoryId);

    /**
     * 根据挂号id查询病历
     * @param RegId
     * @return
     */
    @GetMapping("/queryCaseHistoryByRegId")
    Result<CaseHistoryResult> queryCaseHistoryByRegId(@RequestParam("RegId") Long RegId);


    /**
     * 挂号时生成病历
     * @param
     * @return
     */
    @GetMapping("/createCaseHistoryWhenRegistration")
    Result<CaseHistoryResult> createCaseHistoryWhenRegistration(@RequestParam("patientId") Long patientId,
                                                                @RequestParam("skdId") Long skdId,
                                                                @RequestParam("registrationId") Long  registrationId);

    @GetMapping("/queryById")
    public Result<CaseHistoryResult> queryById(@RequestParam("id")Long id);

}


